package com.gg.fmallspringboot.entity;
/* stohox
2021/6/20 19:42 */

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import java.math.BigDecimal;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Paylog {
    //定义这样一个全局的静态常量，有利于后期修改状态无需多处修改
    public final static int pay_static_waiting=0;//待支付
    public final static int pay_static_paid=1;//已支付
    public final static int pay_static_refunded=2;//已退款
    public final static int pay_static_closed=3;//已关闭
    //支付记录编号
    @Column(name="sn",nullable = false,unique = true,length = 64)
    private String sn;
    //支付平台交易号
    @Column(name="trade_no",unique = true,length = 32)
    private String tradeNo;
    //支付金额
    @Column(name="total_amount",length = 11)
    private BigDecimal totalaMount;
    //订单标题
    @Column(name="title",length = 256)
    private String title;
    //订单描述
    @Column(name="info",length = 128)
    private String info;
    //退款记录编号
    @Column(name="refund_sn",nullable = false,unique = true,length = 64)
    private String refundSn;
    //退款金额
    @Column(name="refund_amount",length = 9)
    private BigDecimal refundMount;
    //订单描述
    @Column(name="refund_reason",length = 256)
    private String refundReason;
    //订单状态
    @Column(name="status",nullable = false,length = 4)
    private Integer status=pay_static_waiting;
    private Integer Paytype;
}
